package com.xhwl.data.dao.personal;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.xhwl.common.pojo.cent.sdata.personnel.Staff;
import com.xhwl.common.pojo.cent.sdata.personnel.StaffDTO;
import com.xhwl.common.query.cent.sdata.StaffQuery;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @Author: luyi
 * @Description:
 * @Date: Create in 16:03 2022/2/8
 */
@Repository
public interface IStaffDao extends BaseMapper<Staff> {


    Page<StaffDTO> page(Page page, @Param("staffQuery") StaffQuery staffQuery);

    Page<StaffDTO> pageAll(Page page, @Param("staffQuery") StaffQuery staffQuery);

    List<Integer> pageAllAccountId(@Param("staffQuery") StaffQuery staffQuery);

    Staff detail(@Param("id") Integer id, @Param("accountId") Integer accountId);

    List<Staff> deleteDetail(@Param("accountId") Integer accountId);

    List<StaffDTO> list(@Param("staffQuery") StaffQuery staffQuery);

    List<Integer> orgList(@Param("staffQuery") StaffQuery staffQuery);

    Staff one(@Param("staffQuery") StaffQuery staffQuery);


    List<StaffDTO> findByEntIds(@Param("entIds")List<Integer> entIds);

    List<StaffDTO> findByOrgIds(@Param("orgIds")List<Integer> orgIds);

    List<Integer> findAccountId(@Param("ids")List<Integer> ids,@Param("type")Integer type);

}
